package com.konsung.greendaoUtil;

import java.util.List;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.query.Query;
import org.greenrobot.greendao.query.QueryBuilder;

import com.konsung.bean.MeasureDataBean;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** 
 * DAO for table "MEASURE_DATA_BEAN".
*/
public class MeasureDataBeanDao extends AbstractDao<MeasureDataBean, Long> {

    public static final String TABLENAME = "MEASURE_DATA_BEAN";

    /**
     * Properties of entity MeasureDataBean.<br/>
     * Can be used for QueryBuilder and for referencing column names.
     */
    public static class Properties {
        public final static Property Id = new Property(0, Long.class, "id", true, "_id");
        public final static Property PatientId = new Property(1, Long.class, "patientId", false, "PATIENT_ID");
        public final static Property Uuid = new Property(2, String.class, "uuid", false, "UUID");
        public final static Property GluStyle = new Property(3, String.class, "gluStyle", false, "GLU_STYLE");
        public final static Property UploadFlag = new Property(4, boolean.class, "uploadFlag", false, "UPLOAD_FLAG");
        public final static Property Idcard = new Property(5, String.class, "idcard", false, "IDCARD");
        public final static Property EcgHr = new Property(6, int.class, "ecgHr", false, "ECG_HR");
        public final static Property EcgBr = new Property(7, int.class, "ecgBr", false, "ECG_BR");
        public final static Property TAxis = new Property(8, int.class, "tAxis", false, "T_AXIS");
        public final static Property PAxis = new Property(9, int.class, "pAxis", false, "P_AXIS");
        public final static Property QrsAxis = new Property(10, int.class, "qrsAxis", false, "QRS_AXIS");
        public final static Property Qrs = new Property(11, int.class, "qrs", false, "QRS");
        public final static Property Pr = new Property(12, int.class, "pr", false, "PR");
        public final static Property Qt = new Property(13, int.class, "qt", false, "QT");
        public final static Property Qtc = new Property(14, int.class, "qtc", false, "QTC");
        public final static Property Sv1 = new Property(15, int.class, "sv1", false, "SV1");
        public final static Property Rv5 = new Property(16, int.class, "rv5", false, "RV5");
        public final static Property EcgDiagnoseResult = new Property(17, String.class, "ecgDiagnoseResult", false, "ECG_DIAGNOSE_RESULT");
        public final static Property Spo2Tred = new Property(18, int.class, "spo2Tred", false, "SPO2_TRED");
        public final static Property Spo2Pr = new Property(19, int.class, "spo2Pr", false, "SPO2_PR");
        public final static Property NibpSys = new Property(20, int.class, "nibpSys", false, "NIBP_SYS");
        public final static Property NibpDia = new Property(21, int.class, "nibpDia", false, "NIBP_DIA");
        public final static Property NibpPr = new Property(22, int.class, "nibpPr", false, "NIBP_PR");
        public final static Property Temp = new Property(23, int.class, "temp", false, "TEMP");
        public final static Property Irtemp = new Property(24, int.class, "irtemp", false, "IRTEMP");
        public final static Property UrinertLeu = new Property(25, int.class, "urinertLeu", false, "URINERT_LEU");
        public final static Property UrinertNit = new Property(26, int.class, "urinertNit", false, "URINERT_NIT");
        public final static Property UrinertUbg = new Property(27, int.class, "urinertUbg", false, "URINERT_UBG");
        public final static Property UrinertPro = new Property(28, int.class, "urinertPro", false, "URINERT_PRO");
        public final static Property UrinertPh = new Property(29, int.class, "urinertPh", false, "URINERT_PH");
        public final static Property UrinertBld = new Property(30, int.class, "urinertBld", false, "URINERT_BLD");
        public final static Property UrinertSg = new Property(31, int.class, "urinertSg", false, "URINERT_SG");
        public final static Property UrinertBil = new Property(32, int.class, "urinertBil", false, "URINERT_BIL");
        public final static Property UrinertKet = new Property(33, int.class, "urinertKet", false, "URINERT_KET");
        public final static Property UrinertGlu = new Property(34, int.class, "urinertGlu", false, "URINERT_GLU");
        public final static Property UrinertAsc = new Property(35, int.class, "urinertAsc", false, "URINERT_ASC");
        public final static Property UrinertAlb = new Property(36, int.class, "urinertAlb", false, "URINERT_ALB");
        public final static Property UrinertCre = new Property(37, int.class, "urinertCre", false, "URINERT_CRE");
        public final static Property UrinertCa = new Property(38, int.class, "urinertCa", false, "URINERT_CA");
        public final static Property UrinertAc = new Property(39, int.class, "urinertAc", false, "URINERT_AC");
        public final static Property BloodgluBeforeMeal = new Property(40, int.class, "bloodgluBeforeMeal", false, "BLOODGLU_BEFORE_MEAL");
        public final static Property BloodgluAfterMeal = new Property(41, int.class, "bloodgluAfterMeal", false, "BLOODGLU_AFTER_MEAL");
        public final static Property BloodWbc = new Property(42, int.class, "bloodWbc", false, "BLOOD_WBC");
        public final static Property BloodHgb = new Property(43, int.class, "bloodHgb", false, "BLOOD_HGB");
        public final static Property BloodHct = new Property(44, int.class, "bloodHct", false, "BLOOD_HCT");
        public final static Property UricacidTrend = new Property(45, int.class, "uricacidTrend", false, "URICACID_TREND");
        public final static Property CholesterolTrend = new Property(46, int.class, "cholesterolTrend", false, "CHOLESTEROL_TREND");
        public final static Property Height = new Property(47, int.class, "height", false, "HEIGHT");
        public final static Property Weight = new Property(48, int.class, "weight", false, "WEIGHT");
        public final static Property BloodFatCho = new Property(49, int.class, "bloodFatCho", false, "BLOOD_FAT_CHO");
        public final static Property BloodFatTrig = new Property(50, int.class, "bloodFatTrig", false, "BLOOD_FAT_TRIG");
        public final static Property BloodFatLdl = new Property(51, int.class, "bloodFatLdl", false, "BLOOD_FAT_LDL");
        public final static Property BloodFatHdl = new Property(52, int.class, "bloodFatHdl", false, "BLOOD_FAT_HDL");
        public final static Property IsHaveData = new Property(53, boolean.class, "isHaveData", false, "IS_HAVE_DATA");
        public final static Property EcgWaveI = new Property(54, String.class, "ecgWaveI", false, "ECG_WAVE_I");
        public final static Property EcgWaveIi = new Property(55, String.class, "ecgWaveIi", false, "ECG_WAVE_II");
        public final static Property EcgWaveIii = new Property(56, String.class, "ecgWaveIii", false, "ECG_WAVE_III");
        public final static Property EcgWaveAvr = new Property(57, String.class, "ecgWaveAvr", false, "ECG_WAVE_AVR");
        public final static Property EcgWaveAvl = new Property(58, String.class, "ecgWaveAvl", false, "ECG_WAVE_AVL");
        public final static Property EcgWaveAvf = new Property(59, String.class, "ecgWaveAvf", false, "ECG_WAVE_AVF");
        public final static Property EcgWaveV1 = new Property(60, String.class, "ecgWaveV1", false, "ECG_WAVE_V1");
        public final static Property EcgWaveV2 = new Property(61, String.class, "ecgWaveV2", false, "ECG_WAVE_V2");
        public final static Property EcgWaveV3 = new Property(62, String.class, "ecgWaveV3", false, "ECG_WAVE_V3");
        public final static Property EcgWaveV4 = new Property(63, String.class, "ecgWaveV4", false, "ECG_WAVE_V4");
        public final static Property EcgWaveV5 = new Property(64, String.class, "ecgWaveV5", false, "ECG_WAVE_V5");
        public final static Property EcgWaveV6 = new Property(65, String.class, "ecgWaveV6", false, "ECG_WAVE_V6");
        public final static Property WaveNum = new Property(66, int.class, "waveNum", false, "WAVE_NUM");
        public final static Property NibpMap = new Property(67, int.class, "nibpMap", false, "NIBP_MAP");
        public final static Property MeasureTime = new Property(68, Long.class, "measureTime", false, "MEASURE_TIME");
        public final static Property CheckDay = new Property(69, Long.class, "checkDay", false, "CHECK_DAY");
        public final static Property Doctor = new Property(70, String.class, "doctor", false, "DOCTOR");
        public final static Property Waistline = new Property(71, String.class, "waistline", false, "WAISTLINE");
        public final static Property RespPa = new Property(72, int.class, "respPa", false, "RESP_PA");
        public final static Property Mammarygland = new Property(73, String.class, "mammarygland", false, "MAMMARYGLAND");
        public final static Property Mammaryglanderr = new Property(74, String.class, "mammaryglanderr", false, "MAMMARYGLANDERR");
        public final static Property Vulvaerr = new Property(75, String.class, "vulvaerr", false, "VULVAERR");
        public final static Property Vaginaerr = new Property(76, String.class, "vaginaerr", false, "VAGINAERR");
        public final static Property Cervicalerr = new Property(77, String.class, "cervicalerr", false, "CERVICALERR");
        public final static Property Palaceerr = new Property(78, String.class, "palaceerr", false, "PALACEERR");
        public final static Property Attach = new Property(79, String.class, "attach", false, "ATTACH");
        public final static Property Attacherr = new Property(80, String.class, "attacherr", false, "ATTACHERR");
        public final static Property GhbNGSP = new Property(81, int.class, "ghbNGSP", false, "GHB_NGSP");
        public final static Property GhbIFCC = new Property(82, int.class, "ghbIFCC", false, "GHB_IFCC");
        public final static Property GhbEGA = new Property(83, int.class, "ghbEGA", false, "GHB_EGA");
        public final static Property ParamValue = new Property(84, int.class, "paramValue", false, "PARAM_VALUE");
        public final static Property MeasureValue = new Property(85, int.class, "measureValue", false, "MEASURE_VALUE");
        public final static Property UrtConfig = new Property(86, int.class, "urtConfig", false, "URT_CONFIG");
        public final static Property EcgIsMeasure = new Property(87, boolean.class, "ecgIsMeasure", false, "ECG_IS_MEASURE");
    }

    private Query<MeasureDataBean> patientBean_MeasureDataBeansQuery;

    public MeasureDataBeanDao(DaoConfig config) {
        super(config);
    }
    
    public MeasureDataBeanDao(DaoConfig config, DaoSession daoSession) {
        super(config, daoSession);
    }

    /** Creates the underlying database table. */
    public static void createTable(Database db, boolean ifNotExists) {
        String constraint = ifNotExists? "IF NOT EXISTS ": "";
        db.execSQL("CREATE TABLE " + constraint + "\"MEASURE_DATA_BEAN\" (" + //
                "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
                "\"PATIENT_ID\" INTEGER," + // 1: patientId
                "\"UUID\" TEXT," + // 2: uuid
                "\"GLU_STYLE\" TEXT," + // 3: gluStyle
                "\"UPLOAD_FLAG\" INTEGER NOT NULL ," + // 4: uploadFlag
                "\"IDCARD\" TEXT," + // 5: idcard
                "\"ECG_HR\" INTEGER NOT NULL ," + // 6: ecgHr
                "\"ECG_BR\" INTEGER NOT NULL ," + // 7: ecgBr
                "\"T_AXIS\" INTEGER NOT NULL ," + // 8: tAxis
                "\"P_AXIS\" INTEGER NOT NULL ," + // 9: pAxis
                "\"QRS_AXIS\" INTEGER NOT NULL ," + // 10: qrsAxis
                "\"QRS\" INTEGER NOT NULL ," + // 11: qrs
                "\"PR\" INTEGER NOT NULL ," + // 12: pr
                "\"QT\" INTEGER NOT NULL ," + // 13: qt
                "\"QTC\" INTEGER NOT NULL ," + // 14: qtc
                "\"SV1\" INTEGER NOT NULL ," + // 15: sv1
                "\"RV5\" INTEGER NOT NULL ," + // 16: rv5
                "\"ECG_DIAGNOSE_RESULT\" TEXT," + // 17: ecgDiagnoseResult
                "\"SPO2_TRED\" INTEGER NOT NULL ," + // 18: spo2Tred
                "\"SPO2_PR\" INTEGER NOT NULL ," + // 19: spo2Pr
                "\"NIBP_SYS\" INTEGER NOT NULL ," + // 20: nibpSys
                "\"NIBP_DIA\" INTEGER NOT NULL ," + // 21: nibpDia
                "\"NIBP_PR\" INTEGER NOT NULL ," + // 22: nibpPr
                "\"TEMP\" INTEGER NOT NULL ," + // 23: temp
                "\"IRTEMP\" INTEGER NOT NULL ," + // 24: irtemp
                "\"URINERT_LEU\" INTEGER NOT NULL ," + // 25: urinertLeu
                "\"URINERT_NIT\" INTEGER NOT NULL ," + // 26: urinertNit
                "\"URINERT_UBG\" INTEGER NOT NULL ," + // 27: urinertUbg
                "\"URINERT_PRO\" INTEGER NOT NULL ," + // 28: urinertPro
                "\"URINERT_PH\" INTEGER NOT NULL ," + // 29: urinertPh
                "\"URINERT_BLD\" INTEGER NOT NULL ," + // 30: urinertBld
                "\"URINERT_SG\" INTEGER NOT NULL ," + // 31: urinertSg
                "\"URINERT_BIL\" INTEGER NOT NULL ," + // 32: urinertBil
                "\"URINERT_KET\" INTEGER NOT NULL ," + // 33: urinertKet
                "\"URINERT_GLU\" INTEGER NOT NULL ," + // 34: urinertGlu
                "\"URINERT_ASC\" INTEGER NOT NULL ," + // 35: urinertAsc
                "\"URINERT_ALB\" INTEGER NOT NULL ," + // 36: urinertAlb
                "\"URINERT_CRE\" INTEGER NOT NULL ," + // 37: urinertCre
                "\"URINERT_CA\" INTEGER NOT NULL ," + // 38: urinertCa
                "\"URINERT_AC\" INTEGER NOT NULL ," + // 39: urinertAc
                "\"BLOODGLU_BEFORE_MEAL\" INTEGER NOT NULL ," + // 40: bloodgluBeforeMeal
                "\"BLOODGLU_AFTER_MEAL\" INTEGER NOT NULL ," + // 41: bloodgluAfterMeal
                "\"BLOOD_WBC\" INTEGER NOT NULL ," + // 42: bloodWbc
                "\"BLOOD_HGB\" INTEGER NOT NULL ," + // 43: bloodHgb
                "\"BLOOD_HCT\" INTEGER NOT NULL ," + // 44: bloodHct
                "\"URICACID_TREND\" INTEGER NOT NULL ," + // 45: uricacidTrend
                "\"CHOLESTEROL_TREND\" INTEGER NOT NULL ," + // 46: cholesterolTrend
                "\"HEIGHT\" INTEGER NOT NULL ," + // 47: height
                "\"WEIGHT\" INTEGER NOT NULL ," + // 48: weight
                "\"BLOOD_FAT_CHO\" INTEGER NOT NULL ," + // 49: bloodFatCho
                "\"BLOOD_FAT_TRIG\" INTEGER NOT NULL ," + // 50: bloodFatTrig
                "\"BLOOD_FAT_LDL\" INTEGER NOT NULL ," + // 51: bloodFatLdl
                "\"BLOOD_FAT_HDL\" INTEGER NOT NULL ," + // 52: bloodFatHdl
                "\"IS_HAVE_DATA\" INTEGER NOT NULL ," + // 53: isHaveData
                "\"ECG_WAVE_I\" TEXT," + // 54: ecgWaveI
                "\"ECG_WAVE_II\" TEXT," + // 55: ecgWaveIi
                "\"ECG_WAVE_III\" TEXT," + // 56: ecgWaveIii
                "\"ECG_WAVE_AVR\" TEXT," + // 57: ecgWaveAvr
                "\"ECG_WAVE_AVL\" TEXT," + // 58: ecgWaveAvl
                "\"ECG_WAVE_AVF\" TEXT," + // 59: ecgWaveAvf
                "\"ECG_WAVE_V1\" TEXT," + // 60: ecgWaveV1
                "\"ECG_WAVE_V2\" TEXT," + // 61: ecgWaveV2
                "\"ECG_WAVE_V3\" TEXT," + // 62: ecgWaveV3
                "\"ECG_WAVE_V4\" TEXT," + // 63: ecgWaveV4
                "\"ECG_WAVE_V5\" TEXT," + // 64: ecgWaveV5
                "\"ECG_WAVE_V6\" TEXT," + // 65: ecgWaveV6
                "\"WAVE_NUM\" INTEGER NOT NULL ," + // 66: waveNum
                "\"NIBP_MAP\" INTEGER NOT NULL ," + // 67: nibpMap
                "\"MEASURE_TIME\" INTEGER," + // 68: measureTime
                "\"CHECK_DAY\" INTEGER," + // 69: checkDay
                "\"DOCTOR\" TEXT," + // 70: doctor
                "\"WAISTLINE\" TEXT," + // 71: waistline
                "\"RESP_PA\" INTEGER NOT NULL ," + // 72: respPa
                "\"MAMMARYGLAND\" TEXT," + // 73: mammarygland
                "\"MAMMARYGLANDERR\" TEXT," + // 74: mammaryglanderr
                "\"VULVAERR\" TEXT," + // 75: vulvaerr
                "\"VAGINAERR\" TEXT," + // 76: vaginaerr
                "\"CERVICALERR\" TEXT," + // 77: cervicalerr
                "\"PALACEERR\" TEXT," + // 78: palaceerr
                "\"ATTACH\" TEXT," + // 79: attach
                "\"ATTACHERR\" TEXT," + // 80: attacherr
                "\"GHB_NGSP\" INTEGER NOT NULL ," + // 81: ghbNGSP
                "\"GHB_IFCC\" INTEGER NOT NULL ," + // 82: ghbIFCC
                "\"GHB_EGA\" INTEGER NOT NULL ," + // 83: ghbEGA
                "\"PARAM_VALUE\" INTEGER NOT NULL ," + // 84: paramValue
                "\"MEASURE_VALUE\" INTEGER NOT NULL ," + // 85: measureValue
                "\"URT_CONFIG\" INTEGER NOT NULL ," + // 86: urtConfig
                "\"ECG_IS_MEASURE\" INTEGER NOT NULL );"); // 87: ecgIsMeasure
    }

    /** Drops the underlying database table. */
    public static void dropTable(Database db, boolean ifExists) {
        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MEASURE_DATA_BEAN\"";
        db.execSQL(sql);
    }

    @Override
    protected final void bindValues(DatabaseStatement stmt, MeasureDataBean entity) {
        stmt.clearBindings();
 
        Long id = entity.getId();
        if (id != null) {
            stmt.bindLong(1, id);
        }
 
        Long patientId = entity.getPatientId();
        if (patientId != null) {
            stmt.bindLong(2, patientId);
        }
 
        String uuid = entity.getUuid();
        if (uuid != null) {
            stmt.bindString(3, uuid);
        }
 
        String gluStyle = entity.getGluStyle();
        if (gluStyle != null) {
            stmt.bindString(4, gluStyle);
        }
        stmt.bindLong(5, entity.getUploadFlag() ? 1L: 0L);
 
        String idcard = entity.getIdcard();
        if (idcard != null) {
            stmt.bindString(6, idcard);
        }
        stmt.bindLong(7, entity.getEcgHr());
        stmt.bindLong(8, entity.getEcgBr());
        stmt.bindLong(9, entity.getTAxis());
        stmt.bindLong(10, entity.getPAxis());
        stmt.bindLong(11, entity.getQrsAxis());
        stmt.bindLong(12, entity.getQrs());
        stmt.bindLong(13, entity.getPr());
        stmt.bindLong(14, entity.getQt());
        stmt.bindLong(15, entity.getQtc());
        stmt.bindLong(16, entity.getSv1());
        stmt.bindLong(17, entity.getRv5());
 
        String ecgDiagnoseResult = entity.getEcgDiagnoseResult();
        if (ecgDiagnoseResult != null) {
            stmt.bindString(18, ecgDiagnoseResult);
        }
        stmt.bindLong(19, entity.getSpo2Tred());
        stmt.bindLong(20, entity.getSpo2Pr());
        stmt.bindLong(21, entity.getNibpSys());
        stmt.bindLong(22, entity.getNibpDia());
        stmt.bindLong(23, entity.getNibpPr());
        stmt.bindLong(24, entity.getTemp());
        stmt.bindLong(25, entity.getIrtemp());
        stmt.bindLong(26, entity.getUrinertLeu());
        stmt.bindLong(27, entity.getUrinertNit());
        stmt.bindLong(28, entity.getUrinertUbg());
        stmt.bindLong(29, entity.getUrinertPro());
        stmt.bindLong(30, entity.getUrinertPh());
        stmt.bindLong(31, entity.getUrinertBld());
        stmt.bindLong(32, entity.getUrinertSg());
        stmt.bindLong(33, entity.getUrinertBil());
        stmt.bindLong(34, entity.getUrinertKet());
        stmt.bindLong(35, entity.getUrinertGlu());
        stmt.bindLong(36, entity.getUrinertAsc());
        stmt.bindLong(37, entity.getUrinertAlb());
        stmt.bindLong(38, entity.getUrinertCre());
        stmt.bindLong(39, entity.getUrinertCa());
        stmt.bindLong(40, entity.getUrinertAc());
        stmt.bindLong(41, entity.getBloodgluBeforeMeal());
        stmt.bindLong(42, entity.getBloodgluAfterMeal());
        stmt.bindLong(43, entity.getBloodWbc());
        stmt.bindLong(44, entity.getBloodHgb());
        stmt.bindLong(45, entity.getBloodHct());
        stmt.bindLong(46, entity.getUricacidTrend());
        stmt.bindLong(47, entity.getCholesterolTrend());
        stmt.bindLong(48, entity.getHeight());
        stmt.bindLong(49, entity.getWeight());
        stmt.bindLong(50, entity.getBloodFatCho());
        stmt.bindLong(51, entity.getBloodFatTrig());
        stmt.bindLong(52, entity.getBloodFatLdl());
        stmt.bindLong(53, entity.getBloodFatHdl());
        stmt.bindLong(54, entity.getIsHaveData() ? 1L: 0L);
 
        String ecgWaveI = entity.getEcgWaveI();
        if (ecgWaveI != null) {
            stmt.bindString(55, ecgWaveI);
        }
 
        String ecgWaveIi = entity.getEcgWaveIi();
        if (ecgWaveIi != null) {
            stmt.bindString(56, ecgWaveIi);
        }
 
        String ecgWaveIii = entity.getEcgWaveIii();
        if (ecgWaveIii != null) {
            stmt.bindString(57, ecgWaveIii);
        }
 
        String ecgWaveAvr = entity.getEcgWaveAvr();
        if (ecgWaveAvr != null) {
            stmt.bindString(58, ecgWaveAvr);
        }
 
        String ecgWaveAvl = entity.getEcgWaveAvl();
        if (ecgWaveAvl != null) {
            stmt.bindString(59, ecgWaveAvl);
        }
 
        String ecgWaveAvf = entity.getEcgWaveAvf();
        if (ecgWaveAvf != null) {
            stmt.bindString(60, ecgWaveAvf);
        }
 
        String ecgWaveV1 = entity.getEcgWaveV1();
        if (ecgWaveV1 != null) {
            stmt.bindString(61, ecgWaveV1);
        }
 
        String ecgWaveV2 = entity.getEcgWaveV2();
        if (ecgWaveV2 != null) {
            stmt.bindString(62, ecgWaveV2);
        }
 
        String ecgWaveV3 = entity.getEcgWaveV3();
        if (ecgWaveV3 != null) {
            stmt.bindString(63, ecgWaveV3);
        }
 
        String ecgWaveV4 = entity.getEcgWaveV4();
        if (ecgWaveV4 != null) {
            stmt.bindString(64, ecgWaveV4);
        }
 
        String ecgWaveV5 = entity.getEcgWaveV5();
        if (ecgWaveV5 != null) {
            stmt.bindString(65, ecgWaveV5);
        }
 
        String ecgWaveV6 = entity.getEcgWaveV6();
        if (ecgWaveV6 != null) {
            stmt.bindString(66, ecgWaveV6);
        }
        stmt.bindLong(67, entity.getWaveNum());
        stmt.bindLong(68, entity.getNibpMap());
 
        Long measureTime = entity.getMeasureTime();
        if (measureTime != null) {
            stmt.bindLong(69, measureTime);
        }
 
        Long checkDay = entity.getCheckDay();
        if (checkDay != null) {
            stmt.bindLong(70, checkDay);
        }
 
        String doctor = entity.getDoctor();
        if (doctor != null) {
            stmt.bindString(71, doctor);
        }
 
        String waistline = entity.getWaistline();
        if (waistline != null) {
            stmt.bindString(72, waistline);
        }
        stmt.bindLong(73, entity.getRespPa());
 
        String mammarygland = entity.getMammarygland();
        if (mammarygland != null) {
            stmt.bindString(74, mammarygland);
        }
 
        String mammaryglanderr = entity.getMammaryglanderr();
        if (mammaryglanderr != null) {
            stmt.bindString(75, mammaryglanderr);
        }
 
        String vulvaerr = entity.getVulvaerr();
        if (vulvaerr != null) {
            stmt.bindString(76, vulvaerr);
        }
 
        String vaginaerr = entity.getVaginaerr();
        if (vaginaerr != null) {
            stmt.bindString(77, vaginaerr);
        }
 
        String cervicalerr = entity.getCervicalerr();
        if (cervicalerr != null) {
            stmt.bindString(78, cervicalerr);
        }
 
        String palaceerr = entity.getPalaceerr();
        if (palaceerr != null) {
            stmt.bindString(79, palaceerr);
        }
 
        String attach = entity.getAttach();
        if (attach != null) {
            stmt.bindString(80, attach);
        }
 
        String attacherr = entity.getAttacherr();
        if (attacherr != null) {
            stmt.bindString(81, attacherr);
        }
        stmt.bindLong(82, entity.getGhbNGSP());
        stmt.bindLong(83, entity.getGhbIFCC());
        stmt.bindLong(84, entity.getGhbEGA());
        stmt.bindLong(85, entity.getParamValue());
        stmt.bindLong(86, entity.getMeasureValue());
        stmt.bindLong(87, entity.getUrtConfig());
        stmt.bindLong(88, entity.getEcgIsMeasure() ? 1L: 0L);
    }

    @Override
    protected final void bindValues(SQLiteStatement stmt, MeasureDataBean entity) {
        stmt.clearBindings();
 
        Long id = entity.getId();
        if (id != null) {
            stmt.bindLong(1, id);
        }
 
        Long patientId = entity.getPatientId();
        if (patientId != null) {
            stmt.bindLong(2, patientId);
        }
 
        String uuid = entity.getUuid();
        if (uuid != null) {
            stmt.bindString(3, uuid);
        }
 
        String gluStyle = entity.getGluStyle();
        if (gluStyle != null) {
            stmt.bindString(4, gluStyle);
        }
        stmt.bindLong(5, entity.getUploadFlag() ? 1L: 0L);
 
        String idcard = entity.getIdcard();
        if (idcard != null) {
            stmt.bindString(6, idcard);
        }
        stmt.bindLong(7, entity.getEcgHr());
        stmt.bindLong(8, entity.getEcgBr());
        stmt.bindLong(9, entity.getTAxis());
        stmt.bindLong(10, entity.getPAxis());
        stmt.bindLong(11, entity.getQrsAxis());
        stmt.bindLong(12, entity.getQrs());
        stmt.bindLong(13, entity.getPr());
        stmt.bindLong(14, entity.getQt());
        stmt.bindLong(15, entity.getQtc());
        stmt.bindLong(16, entity.getSv1());
        stmt.bindLong(17, entity.getRv5());
 
        String ecgDiagnoseResult = entity.getEcgDiagnoseResult();
        if (ecgDiagnoseResult != null) {
            stmt.bindString(18, ecgDiagnoseResult);
        }
        stmt.bindLong(19, entity.getSpo2Tred());
        stmt.bindLong(20, entity.getSpo2Pr());
        stmt.bindLong(21, entity.getNibpSys());
        stmt.bindLong(22, entity.getNibpDia());
        stmt.bindLong(23, entity.getNibpPr());
        stmt.bindLong(24, entity.getTemp());
        stmt.bindLong(25, entity.getIrtemp());
        stmt.bindLong(26, entity.getUrinertLeu());
        stmt.bindLong(27, entity.getUrinertNit());
        stmt.bindLong(28, entity.getUrinertUbg());
        stmt.bindLong(29, entity.getUrinertPro());
        stmt.bindLong(30, entity.getUrinertPh());
        stmt.bindLong(31, entity.getUrinertBld());
        stmt.bindLong(32, entity.getUrinertSg());
        stmt.bindLong(33, entity.getUrinertBil());
        stmt.bindLong(34, entity.getUrinertKet());
        stmt.bindLong(35, entity.getUrinertGlu());
        stmt.bindLong(36, entity.getUrinertAsc());
        stmt.bindLong(37, entity.getUrinertAlb());
        stmt.bindLong(38, entity.getUrinertCre());
        stmt.bindLong(39, entity.getUrinertCa());
        stmt.bindLong(40, entity.getUrinertAc());
        stmt.bindLong(41, entity.getBloodgluBeforeMeal());
        stmt.bindLong(42, entity.getBloodgluAfterMeal());
        stmt.bindLong(43, entity.getBloodWbc());
        stmt.bindLong(44, entity.getBloodHgb());
        stmt.bindLong(45, entity.getBloodHct());
        stmt.bindLong(46, entity.getUricacidTrend());
        stmt.bindLong(47, entity.getCholesterolTrend());
        stmt.bindLong(48, entity.getHeight());
        stmt.bindLong(49, entity.getWeight());
        stmt.bindLong(50, entity.getBloodFatCho());
        stmt.bindLong(51, entity.getBloodFatTrig());
        stmt.bindLong(52, entity.getBloodFatLdl());
        stmt.bindLong(53, entity.getBloodFatHdl());
        stmt.bindLong(54, entity.getIsHaveData() ? 1L: 0L);
 
        String ecgWaveI = entity.getEcgWaveI();
        if (ecgWaveI != null) {
            stmt.bindString(55, ecgWaveI);
        }
 
        String ecgWaveIi = entity.getEcgWaveIi();
        if (ecgWaveIi != null) {
            stmt.bindString(56, ecgWaveIi);
        }
 
        String ecgWaveIii = entity.getEcgWaveIii();
        if (ecgWaveIii != null) {
            stmt.bindString(57, ecgWaveIii);
        }
 
        String ecgWaveAvr = entity.getEcgWaveAvr();
        if (ecgWaveAvr != null) {
            stmt.bindString(58, ecgWaveAvr);
        }
 
        String ecgWaveAvl = entity.getEcgWaveAvl();
        if (ecgWaveAvl != null) {
            stmt.bindString(59, ecgWaveAvl);
        }
 
        String ecgWaveAvf = entity.getEcgWaveAvf();
        if (ecgWaveAvf != null) {
            stmt.bindString(60, ecgWaveAvf);
        }
 
        String ecgWaveV1 = entity.getEcgWaveV1();
        if (ecgWaveV1 != null) {
            stmt.bindString(61, ecgWaveV1);
        }
 
        String ecgWaveV2 = entity.getEcgWaveV2();
        if (ecgWaveV2 != null) {
            stmt.bindString(62, ecgWaveV2);
        }
 
        String ecgWaveV3 = entity.getEcgWaveV3();
        if (ecgWaveV3 != null) {
            stmt.bindString(63, ecgWaveV3);
        }
 
        String ecgWaveV4 = entity.getEcgWaveV4();
        if (ecgWaveV4 != null) {
            stmt.bindString(64, ecgWaveV4);
        }
 
        String ecgWaveV5 = entity.getEcgWaveV5();
        if (ecgWaveV5 != null) {
            stmt.bindString(65, ecgWaveV5);
        }
 
        String ecgWaveV6 = entity.getEcgWaveV6();
        if (ecgWaveV6 != null) {
            stmt.bindString(66, ecgWaveV6);
        }
        stmt.bindLong(67, entity.getWaveNum());
        stmt.bindLong(68, entity.getNibpMap());
 
        Long measureTime = entity.getMeasureTime();
        if (measureTime != null) {
            stmt.bindLong(69, measureTime);
        }
 
        Long checkDay = entity.getCheckDay();
        if (checkDay != null) {
            stmt.bindLong(70, checkDay);
        }
 
        String doctor = entity.getDoctor();
        if (doctor != null) {
            stmt.bindString(71, doctor);
        }
 
        String waistline = entity.getWaistline();
        if (waistline != null) {
            stmt.bindString(72, waistline);
        }
        stmt.bindLong(73, entity.getRespPa());
 
        String mammarygland = entity.getMammarygland();
        if (mammarygland != null) {
            stmt.bindString(74, mammarygland);
        }
 
        String mammaryglanderr = entity.getMammaryglanderr();
        if (mammaryglanderr != null) {
            stmt.bindString(75, mammaryglanderr);
        }
 
        String vulvaerr = entity.getVulvaerr();
        if (vulvaerr != null) {
            stmt.bindString(76, vulvaerr);
        }
 
        String vaginaerr = entity.getVaginaerr();
        if (vaginaerr != null) {
            stmt.bindString(77, vaginaerr);
        }
 
        String cervicalerr = entity.getCervicalerr();
        if (cervicalerr != null) {
            stmt.bindString(78, cervicalerr);
        }
 
        String palaceerr = entity.getPalaceerr();
        if (palaceerr != null) {
            stmt.bindString(79, palaceerr);
        }
 
        String attach = entity.getAttach();
        if (attach != null) {
            stmt.bindString(80, attach);
        }
 
        String attacherr = entity.getAttacherr();
        if (attacherr != null) {
            stmt.bindString(81, attacherr);
        }
        stmt.bindLong(82, entity.getGhbNGSP());
        stmt.bindLong(83, entity.getGhbIFCC());
        stmt.bindLong(84, entity.getGhbEGA());
        stmt.bindLong(85, entity.getParamValue());
        stmt.bindLong(86, entity.getMeasureValue());
        stmt.bindLong(87, entity.getUrtConfig());
        stmt.bindLong(88, entity.getEcgIsMeasure() ? 1L: 0L);
    }

    @Override
    public Long readKey(Cursor cursor, int offset) {
        return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
    }    

    @Override
    public MeasureDataBean readEntity(Cursor cursor, int offset) {
        MeasureDataBean entity = new MeasureDataBean( //
            cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
            cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1), // patientId
            cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // uuid
            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // gluStyle
            cursor.getShort(offset + 4) != 0, // uploadFlag
            cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // idcard
            cursor.getInt(offset + 6), // ecgHr
            cursor.getInt(offset + 7), // ecgBr
            cursor.getInt(offset + 8), // tAxis
            cursor.getInt(offset + 9), // pAxis
            cursor.getInt(offset + 10), // qrsAxis
            cursor.getInt(offset + 11), // qrs
            cursor.getInt(offset + 12), // pr
            cursor.getInt(offset + 13), // qt
            cursor.getInt(offset + 14), // qtc
            cursor.getInt(offset + 15), // sv1
            cursor.getInt(offset + 16), // rv5
            cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // ecgDiagnoseResult
            cursor.getInt(offset + 18), // spo2Tred
            cursor.getInt(offset + 19), // spo2Pr
            cursor.getInt(offset + 20), // nibpSys
            cursor.getInt(offset + 21), // nibpDia
            cursor.getInt(offset + 22), // nibpPr
            cursor.getInt(offset + 23), // temp
            cursor.getInt(offset + 24), // irtemp
            cursor.getInt(offset + 25), // urinertLeu
            cursor.getInt(offset + 26), // urinertNit
            cursor.getInt(offset + 27), // urinertUbg
            cursor.getInt(offset + 28), // urinertPro
            cursor.getInt(offset + 29), // urinertPh
            cursor.getInt(offset + 30), // urinertBld
            cursor.getInt(offset + 31), // urinertSg
            cursor.getInt(offset + 32), // urinertBil
            cursor.getInt(offset + 33), // urinertKet
            cursor.getInt(offset + 34), // urinertGlu
            cursor.getInt(offset + 35), // urinertAsc
            cursor.getInt(offset + 36), // urinertAlb
            cursor.getInt(offset + 37), // urinertCre
            cursor.getInt(offset + 38), // urinertCa
            cursor.getInt(offset + 39), // urinertAc
            cursor.getInt(offset + 40), // bloodgluBeforeMeal
            cursor.getInt(offset + 41), // bloodgluAfterMeal
            cursor.getInt(offset + 42), // bloodWbc
            cursor.getInt(offset + 43), // bloodHgb
            cursor.getInt(offset + 44), // bloodHct
            cursor.getInt(offset + 45), // uricacidTrend
            cursor.getInt(offset + 46), // cholesterolTrend
            cursor.getInt(offset + 47), // height
            cursor.getInt(offset + 48), // weight
            cursor.getInt(offset + 49), // bloodFatCho
            cursor.getInt(offset + 50), // bloodFatTrig
            cursor.getInt(offset + 51), // bloodFatLdl
            cursor.getInt(offset + 52), // bloodFatHdl
            cursor.getShort(offset + 53) != 0, // isHaveData
            cursor.isNull(offset + 54) ? null : cursor.getString(offset + 54), // ecgWaveI
            cursor.isNull(offset + 55) ? null : cursor.getString(offset + 55), // ecgWaveIi
            cursor.isNull(offset + 56) ? null : cursor.getString(offset + 56), // ecgWaveIii
            cursor.isNull(offset + 57) ? null : cursor.getString(offset + 57), // ecgWaveAvr
            cursor.isNull(offset + 58) ? null : cursor.getString(offset + 58), // ecgWaveAvl
            cursor.isNull(offset + 59) ? null : cursor.getString(offset + 59), // ecgWaveAvf
            cursor.isNull(offset + 60) ? null : cursor.getString(offset + 60), // ecgWaveV1
            cursor.isNull(offset + 61) ? null : cursor.getString(offset + 61), // ecgWaveV2
            cursor.isNull(offset + 62) ? null : cursor.getString(offset + 62), // ecgWaveV3
            cursor.isNull(offset + 63) ? null : cursor.getString(offset + 63), // ecgWaveV4
            cursor.isNull(offset + 64) ? null : cursor.getString(offset + 64), // ecgWaveV5
            cursor.isNull(offset + 65) ? null : cursor.getString(offset + 65), // ecgWaveV6
            cursor.getInt(offset + 66), // waveNum
            cursor.getInt(offset + 67), // nibpMap
            cursor.isNull(offset + 68) ? null : cursor.getLong(offset + 68), // measureTime
            cursor.isNull(offset + 69) ? null : cursor.getLong(offset + 69), // checkDay
            cursor.isNull(offset + 70) ? null : cursor.getString(offset + 70), // doctor
            cursor.isNull(offset + 71) ? null : cursor.getString(offset + 71), // waistline
            cursor.getInt(offset + 72), // respPa
            cursor.isNull(offset + 73) ? null : cursor.getString(offset + 73), // mammarygland
            cursor.isNull(offset + 74) ? null : cursor.getString(offset + 74), // mammaryglanderr
            cursor.isNull(offset + 75) ? null : cursor.getString(offset + 75), // vulvaerr
            cursor.isNull(offset + 76) ? null : cursor.getString(offset + 76), // vaginaerr
            cursor.isNull(offset + 77) ? null : cursor.getString(offset + 77), // cervicalerr
            cursor.isNull(offset + 78) ? null : cursor.getString(offset + 78), // palaceerr
            cursor.isNull(offset + 79) ? null : cursor.getString(offset + 79), // attach
            cursor.isNull(offset + 80) ? null : cursor.getString(offset + 80), // attacherr
            cursor.getInt(offset + 81), // ghbNGSP
            cursor.getInt(offset + 82), // ghbIFCC
            cursor.getInt(offset + 83), // ghbEGA
            cursor.getInt(offset + 84), // paramValue
            cursor.getInt(offset + 85), // measureValue
            cursor.getInt(offset + 86), // urtConfig
            cursor.getShort(offset + 87) != 0 // ecgIsMeasure
        );
        return entity;
    }
     
    @Override
    public void readEntity(Cursor cursor, MeasureDataBean entity, int offset) {
        entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
        entity.setPatientId(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1));
        entity.setUuid(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
        entity.setGluStyle(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
        entity.setUploadFlag(cursor.getShort(offset + 4) != 0);
        entity.setIdcard(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
        entity.setEcgHr(cursor.getInt(offset + 6));
        entity.setEcgBr(cursor.getInt(offset + 7));
        entity.setTAxis(cursor.getInt(offset + 8));
        entity.setPAxis(cursor.getInt(offset + 9));
        entity.setQrsAxis(cursor.getInt(offset + 10));
        entity.setQrs(cursor.getInt(offset + 11));
        entity.setPr(cursor.getInt(offset + 12));
        entity.setQt(cursor.getInt(offset + 13));
        entity.setQtc(cursor.getInt(offset + 14));
        entity.setSv1(cursor.getInt(offset + 15));
        entity.setRv5(cursor.getInt(offset + 16));
        entity.setEcgDiagnoseResult(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
        entity.setSpo2Tred(cursor.getInt(offset + 18));
        entity.setSpo2Pr(cursor.getInt(offset + 19));
        entity.setNibpSys(cursor.getInt(offset + 20));
        entity.setNibpDia(cursor.getInt(offset + 21));
        entity.setNibpPr(cursor.getInt(offset + 22));
        entity.setTemp(cursor.getInt(offset + 23));
        entity.setIrtemp(cursor.getInt(offset + 24));
        entity.setUrinertLeu(cursor.getInt(offset + 25));
        entity.setUrinertNit(cursor.getInt(offset + 26));
        entity.setUrinertUbg(cursor.getInt(offset + 27));
        entity.setUrinertPro(cursor.getInt(offset + 28));
        entity.setUrinertPh(cursor.getInt(offset + 29));
        entity.setUrinertBld(cursor.getInt(offset + 30));
        entity.setUrinertSg(cursor.getInt(offset + 31));
        entity.setUrinertBil(cursor.getInt(offset + 32));
        entity.setUrinertKet(cursor.getInt(offset + 33));
        entity.setUrinertGlu(cursor.getInt(offset + 34));
        entity.setUrinertAsc(cursor.getInt(offset + 35));
        entity.setUrinertAlb(cursor.getInt(offset + 36));
        entity.setUrinertCre(cursor.getInt(offset + 37));
        entity.setUrinertCa(cursor.getInt(offset + 38));
        entity.setUrinertAc(cursor.getInt(offset + 39));
        entity.setBloodgluBeforeMeal(cursor.getInt(offset + 40));
        entity.setBloodgluAfterMeal(cursor.getInt(offset + 41));
        entity.setBloodWbc(cursor.getInt(offset + 42));
        entity.setBloodHgb(cursor.getInt(offset + 43));
        entity.setBloodHct(cursor.getInt(offset + 44));
        entity.setUricacidTrend(cursor.getInt(offset + 45));
        entity.setCholesterolTrend(cursor.getInt(offset + 46));
        entity.setHeight(cursor.getInt(offset + 47));
        entity.setWeight(cursor.getInt(offset + 48));
        entity.setBloodFatCho(cursor.getInt(offset + 49));
        entity.setBloodFatTrig(cursor.getInt(offset + 50));
        entity.setBloodFatLdl(cursor.getInt(offset + 51));
        entity.setBloodFatHdl(cursor.getInt(offset + 52));
        entity.setIsHaveData(cursor.getShort(offset + 53) != 0);
        entity.setEcgWaveI(cursor.isNull(offset + 54) ? null : cursor.getString(offset + 54));
        entity.setEcgWaveIi(cursor.isNull(offset + 55) ? null : cursor.getString(offset + 55));
        entity.setEcgWaveIii(cursor.isNull(offset + 56) ? null : cursor.getString(offset + 56));
        entity.setEcgWaveAvr(cursor.isNull(offset + 57) ? null : cursor.getString(offset + 57));
        entity.setEcgWaveAvl(cursor.isNull(offset + 58) ? null : cursor.getString(offset + 58));
        entity.setEcgWaveAvf(cursor.isNull(offset + 59) ? null : cursor.getString(offset + 59));
        entity.setEcgWaveV1(cursor.isNull(offset + 60) ? null : cursor.getString(offset + 60));
        entity.setEcgWaveV2(cursor.isNull(offset + 61) ? null : cursor.getString(offset + 61));
        entity.setEcgWaveV3(cursor.isNull(offset + 62) ? null : cursor.getString(offset + 62));
        entity.setEcgWaveV4(cursor.isNull(offset + 63) ? null : cursor.getString(offset + 63));
        entity.setEcgWaveV5(cursor.isNull(offset + 64) ? null : cursor.getString(offset + 64));
        entity.setEcgWaveV6(cursor.isNull(offset + 65) ? null : cursor.getString(offset + 65));
        entity.setWaveNum(cursor.getInt(offset + 66));
        entity.setNibpMap(cursor.getInt(offset + 67));
        entity.setMeasureTime(cursor.isNull(offset + 68) ? null : cursor.getLong(offset + 68));
        entity.setCheckDay(cursor.isNull(offset + 69) ? null : cursor.getLong(offset + 69));
        entity.setDoctor(cursor.isNull(offset + 70) ? null : cursor.getString(offset + 70));
        entity.setWaistline(cursor.isNull(offset + 71) ? null : cursor.getString(offset + 71));
        entity.setRespPa(cursor.getInt(offset + 72));
        entity.setMammarygland(cursor.isNull(offset + 73) ? null : cursor.getString(offset + 73));
        entity.setMammaryglanderr(cursor.isNull(offset + 74) ? null : cursor.getString(offset + 74));
        entity.setVulvaerr(cursor.isNull(offset + 75) ? null : cursor.getString(offset + 75));
        entity.setVaginaerr(cursor.isNull(offset + 76) ? null : cursor.getString(offset + 76));
        entity.setCervicalerr(cursor.isNull(offset + 77) ? null : cursor.getString(offset + 77));
        entity.setPalaceerr(cursor.isNull(offset + 78) ? null : cursor.getString(offset + 78));
        entity.setAttach(cursor.isNull(offset + 79) ? null : cursor.getString(offset + 79));
        entity.setAttacherr(cursor.isNull(offset + 80) ? null : cursor.getString(offset + 80));
        entity.setGhbNGSP(cursor.getInt(offset + 81));
        entity.setGhbIFCC(cursor.getInt(offset + 82));
        entity.setGhbEGA(cursor.getInt(offset + 83));
        entity.setParamValue(cursor.getInt(offset + 84));
        entity.setMeasureValue(cursor.getInt(offset + 85));
        entity.setUrtConfig(cursor.getInt(offset + 86));
        entity.setEcgIsMeasure(cursor.getShort(offset + 87) != 0);
     }
    
    @Override
    protected final Long updateKeyAfterInsert(MeasureDataBean entity, long rowId) {
        entity.setId(rowId);
        return rowId;
    }
    
    @Override
    public Long getKey(MeasureDataBean entity) {
        if(entity != null) {
            return entity.getId();
        } else {
            return null;
        }
    }

    @Override
    public boolean hasKey(MeasureDataBean entity) {
        return entity.getId() != null;
    }

    @Override
    protected final boolean isEntityUpdateable() {
        return true;
    }
    
    /** Internal query to resolve the "measureDataBeans" to-many relationship of PatientBean. */
    public List<MeasureDataBean> _queryPatientBean_MeasureDataBeans(Long patientId) {
        synchronized (this) {
            if (patientBean_MeasureDataBeansQuery == null) {
                QueryBuilder<MeasureDataBean> queryBuilder = queryBuilder();
                queryBuilder.where(Properties.PatientId.eq(null));
                patientBean_MeasureDataBeansQuery = queryBuilder.build();
            }
        }
        Query<MeasureDataBean> query = patientBean_MeasureDataBeansQuery.forCurrentThread();
        query.setParameter(0, patientId);
        return query.list();
    }

}
